package com.zmc.common.enums;

import lombok.Getter;

/**
 * @Author：zmc
 * @Date：2024/10/16 19:53
 */
@Getter
public enum ErrorCodeEnum{

    TOKEN_EXPIRE_EXCEPTION(401,"请前往登录"),

    EXCEPTION(500,"系统异常"),

    REPEAT_SUBMIT_EXCEPTION(501,"正在处理中，请稍后"),

    WEB_DISPLAY__EXCEPTION(502,"页面显示异常"),

    FIELD_VALID_EXCEPTION(601,"字段验证异常"),

    THIRD_REQUEST_EXCEPTION(701,"三方调用异常"),

    BUSINESS_EXCEPTION(801,"业务异常"),

    BLACK_LIST_EXCEPTION(10101,"黑名单校验异常"),

    CAPTCHA_EXPIRE_EXCEPTION(10103,"验证码失效"),

    USER_NOT_EXIST_EXCEPTION(10201,"验证码失效"),
    USER_PASSWORD_NOT_MATCH_EXCEPTION(10202,"用户密码不正确"),
    USER_PASSWORD_RETRY_LIMIT_EXCEPTION(10202,"输入错误次数过多，请稍后再试"),

    SERVICE_EXCEPTION(10301,"业务异常"),
    UTIL_EXCEPTION(10401,"工具类异常"),
    STATUS_EXCEPTION(10402,"状态异常"),

    FILE_NAME_LENGTH_LIMIT_EXCEPTION(10501,"文件名称太长"),
    FILE_SIZE_LIMIT_EXCEPTION(10502,"文件超出最大限制"),
    FILE_UPLOAD_EXCEPTION(10503,"文件上传异常"),



    PURCHASE_INPUT_ORDER_ITEM_EMPTY_EXCEPTION(20100, "商品条目不能为空"),
    PURCHASE_INPUT_ORDER_ITEM_PUT_ON_EMPTY_EXCEPTION(20101, "采购入库单上架条目不能为空"),


    PRODUCT_NOT_EXIST_EXCEPTION(20201, "商品不存在"),
    PRODUCT_STATUS_EXCEPTION(20202, "请检查商品状态"),
    PRODUCT_SKU_EXCEPTION(20203, "请检查商品sku"),

    PRODUCT_CART_NULL_EXCEPTION(20301, "购物车空了"),
    ORDER_EXCEPTION(20302,"订单异常"),
    ORDER_NOT_EXIT_EXCEPTION(12401, "订单不存在"),
    ORDER_STATUS_CANCEL_EXCEPTION(12402, "当前订单状态暂时无法取消，请先完成订单，然后申请售后"),

    SENSITIVE_WORD_EXCEPTION(12403, "评论中不允许包含违规敏感词字样"),


    MEMBER_NOT_EXIST_EXCEPTION(20501,"用户名或密码不存在"),
    MEMBER_PASSWORD_NOT_MATCH_EXCEPTION(20502,"用户名或密码不正确"),
    PHONE_EXCEPTION(20503,"请检查手机号是否正确"),
    MEMBER_PHONE_CODE_EXCEPTION(20504,"验证码不正确，请重新发送"),
    MEMBER_PHONE_CODE_REPEAT_EXCEPTION(20505,"验证码正在发送中，请稍后"),
    MEMBER_EMAIL_REPEAT_EXCEPTION(20506,"邮箱已被注册"),
    MEMBER_USERNAME_REPEAT_EXCEPTION(20507,"该账号已存在"),
    MEMBER_PWD_EXCEPTION(20508,"密码验证失败！"),


    //12300
    ADDRESS_MAX_COUNT_EXCEPTION(12301, "收货地址超过最大限制"),

    //es:12900
    ES_INDEX_NULL_EXCEPTION(12901, "elasticsearch 索引空指针异常"),
    ES_DATA_NULL_EXCEPTION(12902, "elasticsearch 数据不能为空"),
    ES_INDEX_EXCEPTION(12910, "elasticsearch 索引异常"),
    ES_REQUEST_EXCEPTION(12920,"elasticsearch调用异常"),


    LOGISTICS_EXCEPTION(13100,"请求物流接口异常"),

    ;
    final int code;

    final String msg;

    ErrorCodeEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

}
